/*  1:   */package com.github.binarywang.demo.wechat.service.impl;
/*  2:   */
/*  3:   */import com.github.binarywang.demo.wechat.dao.ReferMapper;
/*  4:   */import com.github.binarywang.demo.wechat.model.Refer;
/*  5:   */import com.github.binarywang.demo.wechat.service.WxReferService;
/*  6:   */import java.util.Date;
/*  7:   */import java.util.List;
/*  8:   */import org.springframework.beans.factory.annotation.Autowired;
/*  9:   */import org.springframework.stereotype.Service;
/* 10:   */
/* 11:   */@Service("wxReferService")
/* 12:   */public class WxReferServiceImpl
/* 13:   */  implements WxReferService
/* 14:   */{
/* 15:   */  @Autowired
/* 16:   */  private ReferMapper referMapper;
/* 17:   */  
/* 18:   */  public List<Refer> list()
/* 19:   */  {
/* 20:20 */    return this.referMapper.selectAll();
/* 21:   */  }
/* 22:   */  
/* 23:   */  public int edit(Refer refer) {
/* 24:24 */    return this.referMapper.updateByPrimaryKeySelective(refer);
/* 25:   */  }
/* 26:   */  
/* 27:   */  public int insert(Refer refer)
/* 28:   */  {
/* 29:29 */    refer.setCreatetime(new Date());
/* 30:30 */    this.referMapper.deleteByPrimaryKey(refer.getCourseId());
/* 31:31 */    return this.referMapper.insert(refer);
/* 32:   */  }
/* 33:   */  
/* 34:   */  public int delete(Integer courseId) {
/* 35:35 */    return this.referMapper.deleteByPrimaryKey(courseId);
/* 36:   */  }
/* 37:   */  
/* 38:   */  public Refer selectByCourseId(Integer courseId) {
/* 39:39 */    return this.referMapper.selectByPrimaryKey(courseId);
/* 40:   */  }
/* 41:   */}


/* Location:           C:\Users\Windows\Desktop\wx\BOOT-INF\classes\
 * Qualified Name:     com.github.binarywang.demo.wechat.service.impl.WxReferServiceImpl
 * JD-Core Version:    0.7.0-SNAPSHOT-20130630
 */